<?php
namespace Plugin\Attractions\Inspection\Schema\Inspection_vendors;

use Plugin\Attractions\Inspection\Model\Inspection_vendors\InspectionVendors;
use Hyperf\Swagger\Annotation\Property;
use Hyperf\Swagger\Annotation\Schema;

/**
 * 供应商信息
 */
#[Schema(title: 'InspectionVendorsSchema')]
class InspectionVendorsSchema implements \JsonSerializable
{
    #[Property(property: 'id', title: 'ID', type: 'bigint')]
    public string $id;

    #[Property(property: 'name', title: '公司名称', type: 'varchar')]
    public string $name;

    #[Property(property: 'phone', title: '公司电话', type: 'varchar')]
    public string $phone;

    #[Property(property: 'email', title: '公司邮箱', type: 'varchar')]
    public string $email;

    #[Property(property: 'address', title: '公司地址', type: 'varchar')]
    public string $address;

    #[Property(property: 'congition', title: '识别ID', type: 'varchar')]
    public string $congition;

    #[Property(property: 'remark', title: '备注', type: 'varchar')]
    public string $remark;

    #[Property(property: 'created_at', title: 'created_at', type: 'timestamp')]
    public string $created_at;

    #[Property(property: 'updated_at', title: 'updated_at', type: 'timestamp')]
    public string $updated_at;




    public function __construct(InspectionVendors $model)
    {
       $this->id = $model->id;
       $this->name = $model->name;
       $this->phone = $model->phone;
       $this->email = $model->email;
       $this->address = $model->address;
       $this->congition = $model->congition;
       $this->remark = $model->remark;
       $this->created_at = $model->created_at;
       $this->updated_at = $model->updated_at;

    }

    public function jsonSerialize(): array
    {
        return ['id' => $this->id ,'name' => $this->name ,'phone' => $this->phone ,'email' => $this->email ,'address' => $this->address ,'congition' => $this->congition ,'remark' => $this->remark ,'created_at' => $this->created_at ,'updated_at' => $this->updated_at];
    }
}